//手机型号数据源
export const PhoneBrandMap = {
  "三星": "samsung",
  "小米": "xiaomi",
  "红米": "Redmi",
  "VIVO": "vivo",
  "Real Me 真我": "realme",
  "苹果": "apple",
  "华为": "huawei",
  "OPPO": "oppo",
  "荣耀": "honor",
  "黑鲨": "blackshark",
  "一加": "oneplus",
  "IQOO": "iqoo",
  "努比亚": "nubia",
  "其他": "other brand",
}

//获取资源名称
export function getResourceName(phoneBrand) {//参数：如：apple  返回结果：resource0
  let resourceName = Object.keys(ResourceMap).find(key => ResourceMap[key].brand.find(resBrand => phoneBrand == resBrand))
  return resourceName
}

//获取图片资源描述文本
export function getResourceContent(resourceName, lagg, step) {
  return ResourceMap[resourceName][`content_${lagg}`][step]
}

//获取Android系统
export function getPhoneSystem(phoneBrand) {
  return phoneBrand == 'apple' ? 'ios' : 'android'
}
